package com.example.k251018

import kotlin.random.Random

//class Greeting {
//    private val platform = getPlatform()
//
//    fun greet(): String {
//        return "Hello, ${platform.name}!"
//    }
//}

class Greeting {
    private val platform = getPlatform()

//    fun greet() : String {
//        val firstWorld = if (Random.nextBoolean()) "Hi!" else "Hello!"
//
//        return "$firstWorld guess what this is! > ${platform.name.reversed()}"
//    }

    fun greet() : List<String> = buildList {
        add(if (Random.nextBoolean()) "Hi!" else "Hello!")
        add("Guess what this is! > ${platform.name.reversed()}!")
    }
}